#pragma once
#include "IReactor.h"
#include "Handler.h"
#include <winsock.h>

class RefinedReactor :
	public IReactor<SOCKET>
{
public:
	RefinedReactor(ReactorImplementation<SOCKET>* imp);
	~RefinedReactor(void);

	void register_handler(IEventHandler<SOCKET> *eh,Event_Type et);
	void register_handler(Handler<SOCKET> h, IEventHandler<SOCKET> *eh, Event_Type et);

	void remove_handler(IEventHandler<SOCKET> *eh,Event_Type et);
	void remove_handler(Handler<SOCKET> h, Event_Type et);

	bool handle_events(timeval *timeout = 0);
};

